from rest_framework_mongoengine import serializers
from . import captcha_models


class AYCaptchaSendSerializer(serializers.DocumentSerializer):
    class Meta:
        model = captcha_models.AYCaptchaModel
        fields = ['phonenumber']

class AYCaptchaSerializer(serializers.DocumentSerializer):
    class Meta:
        model = captcha_models.AYCaptchaModel
        fields = ['phonenumber','captcha']


class AYCaptchaNoticeSerializer(serializers.DocumentSerializer):
    class Meta:
        model = captcha_models.AYCaptchaModel
        fields = ['phonenumber','name','smscode']
